package cn.com.cym.gamezao.enums;


import io.swagger.annotations.ApiModel;

/**
 * 时间区间 （上午，下午， 全天）
 */
@ApiModel("时间区间")
public enum DateTimeRange {

    AM("AM","上午"),
    PM("PM","下午"),
    ALL("ALL","全天");

    private String sign;

    private String value;

    private DateTimeRange(String sign,String value){
        this.sign=sign;
        this.value=value;
    }

    public String getSign(){
        return this.sign;
    }

    public String getValue(){
        return this.value;
    }

    public  static  DateTimeRange fromSign(String sign){
        for(DateTimeRange dateTimeRange:DateTimeRange.values()){
            if(dateTimeRange.getSign().equals(sign)){
                return dateTimeRange;
            }
        }
        return  null;
    }
}
